package com.example.travel.service;

import com.example.travel.entity.TravelPackage;
import com.example.travel.repository.TravelPackageRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TravelPackageService {
    
    @Autowired
    private TravelPackageRepository travelPackageRepository;

    public List<TravelPackage> getAllTravelPackages() {
        return travelPackageRepository.findAll();
    }

    public TravelPackage saveTravelPackage(TravelPackage travelPackage) {
        return travelPackageRepository.save(travelPackage);
    }
} 